rm update
[EroBeats.git] / Djinn and Tonic - Erobeats / ResourceMaster.cpp
blob89ee804ff7e4944bd9330ae8ebc79151e0073e54
1 #include "ResourceMaster.h"
3 //HOLD EVERY SINGLE TEXTURE IN CLASSIFIED ARRAYS
5 ResourceMaster::ResourceMaster()
9 ResourceMaster::ResourceMaster(SFX* sfxptr, BGM* bgmptr)
11 sptr = sfxptr;
12 sptr->gameSFX = &gameSFX;
13 bptr = bgmptr;
14 bptr->gameBGM = &gameBGM;
16 SDL_Renderer* rendPtr;
19 ResourceMaster::~ResourceMaster()
21 for (int i = 0; i < gameGraphics.size(); i++) {
22 SDL_DestroyTexture(gameGraphics.at(i));
25 for (int i = 0; i < gameAnimations.size(); i++) {
26 for (int j = 0; j < (gameAnimations.at(i)).size(); j++) {
27 SDL_DestroyTexture(gameAnimations.at(i).at(j));
32 void ResourceMaster::changeResolution(std::string type) {
33 if (strcmp(type.c_str(), "1280X1024") == 0) {
34 SDL_SetWindowSize(window, 1250, 1000);
35 SDL_SetWindowPosition(window, 50, 50);
37 else if (strcmp(type.c_str(), "1000X800") == 0) {
38 SDL_SetWindowSize(window, 1000, 800);
40 else if (strcmp(type.c_str(), "600X480") == 0) {
41 SDL_SetWindowSize(window, 640, 480);